package com.weixin.service;

import java.sql.SQLException;
import java.util.List;

import com.weixin.entity.Store;


public interface StoreService {
	
	
	/**
	 * 查找所有对应的仓库
	 * @param 
	 * @return
	 * @throws SQLException
	 */
	public List<Store> getAll()throws SQLException;
	
	
	/**
	 * 通过仓库编号查找对应的仓库
	 * @param role
	 * @return
	 * @throws SQLException
	 */
	public Store getById(int storehouse_id)throws SQLException;
	
	
	/**
	 * 通过仓库名查找对应的仓库
	 * @param role
	 * @return
	 * @throws SQLException
	 */
	//public Store getByName(String storehouse_name)throws SQLException;
	
	
	/**
	 * 增加仓库
	 * @param store
	 * @return 如果增加成功返回true，如果失败。返回false
	 * @throws SQLException
	 */
	public boolean insert(Store store)throws SQLException;
	
	
	
	/**
	 * 通过仓库id删除仓库数据
	 * @param store_id
	 * @return 删除成功返回true,删除失败返回false
	 * @throws SQLException
	 */
	public boolean deleteById(int storehouse_id)throws SQLException;
	
	
	/**
	 * 修改仓库
	 * @param student
	 * @return 
	 * @throws SQLException
	 */
	public boolean update(Store store)throws SQLException;
	
	/**
	 * 
	 * @param pageSize
	 * @param pageNum
	 * @return
	 * @throws SQLException
	 */
	public List<Store> ListByPage(int pageSize, Integer pageNum)throws SQLException;
	
	/**
	 * 查询数据总条数
	 * @return
	 * @throws SQLException
	 */
	public int getTotal()throws SQLException;

}